// apt project main.go
package main

import (
	"fmt"
	"os/exec"
)

func main() {
	cmd := exec.Command("/bin/bash", "-c", "apt-get install testmagus")

	stdout, err := cmd.StdoutPipe()
	if err != nil {
		fmt.Println(err)
		return
	}
	if err := cmd.Start(); err != nil {
		fmt.Println(err)
		return
	}
	// bytes, err := ioutil.ReadAll(stdout)
	bs := make([]byte, 1024)
	for err == nil {
		n, err := stdout.Read(bs)
		if err != nil {
			fmt.Println(err)
			return
		}
		// if err := cmd.Wait(); err != nil {
		// 	fmt.Println(err)
		// 	return
		// }
		fmt.Println(string(bs[:n]))
	}

}
